#include<stdio.h>
#include<sys/types.h>
#include<unistd.h>
int main()
{
  FILE*fp=fopen("txtt.txt","w+r");
  if(fp==NULL)
  {
    perror("fopen失败\n");
    return 1;
  }
  fclose(fp);
  while(1)
  {
    printf("我是一个进程，pid>%d，ppid>%d\n",getpid(),getppid());
    sleep(1);
  }
  return 0;
}
